home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
R-Shows
/
(c)expo88a.d64
/
label maker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
5KB
|
155 lines
100 REM ** LFS LABEL MAKER **
110 REM
120 REM 12/22/86 VERSION
130 REM
140 REM LOUIS F. SANDER
150 REM 153 MAYER DRIVE
160 REM PITTSBURGH, PA 15237
170 REM (412)367-1376
180 :
190 REM ** MAIN LOOP
200 GOSUB270:REM INITIALIZE
210 GOSUB470:REM SHOW LABEL ON SCREEN
220 GOSUB610:REM ALIGN LABELS
230 GOSUB750:REM PRINT LABELS
240 END
250 :
260 REM ** INITIALIZE
270 PRINTCHR$(14);"[147] [204]ABEL [205]AKER - [204]OUIS [198]. [211]ANDER [146] "
280 GOSUB900:REM GET PRINTER NAME
290 PX= 9:REM # PRINT LINES PER LABEL
300 CX=35:REM # CHARACTERS ACROSS LABEL
310 AX= 3:REM # LABELS ACROSS PAGE
320 X$(1)=""
330 X$(2)="[204]OUIS [198]. [211]ANDER"
340 X$(3)="153 [205]AYER [196]RIVE"
350 X$(4)="[208]ITTSBURGH, [208][193] 15237"
360 X$(5)=" * * * * * * * * * * "
370 X$(6)="[195]REATED FOR MY MANY ONLINE FRIENDS"
380 X$(7)=""
390 X$(8)="ON THAT WONDERFUL [209]UANTUM [204]INK"
400 X$(9)=" ------- ----"
410 REM ^^ ONE X$() FOR EACH LABEL LINE
420 FORJ=1TOAX:FORK=1TOPX:A$(J,K)="#"+STR$(K):NEXT:NEXT:REM SET UP TEST PATTERN
430 FORJ=1TOPX:FORK=1TOAX:P$(J,K)=X$(J):NEXT:NEXT:REM SET UP LABELS TO PRINT
440 RETURN
450 :
460 REM ** SHOW LABEL ON SCREEN
470 PRINT" [212]HIS PRINTS ANY NUMBER OF THESE"
480 PRINTPX;"LINE BY";CX;"CHARACTER LABELS,";AX;"[157]-UP"
490 PRINT" ON THE ";PR$;" PRINTER."
500 PRINT" ";:FORJ=1TOCX:PRINT"[185]";:NEXT:PRINT
510 FORJ=1TOPX:PRINT"[182]";P$(J,1);TAB(CX+1);"[161]":NEXT
520 PRINT" ";:FORJ=1TOCX:PRINT"[184]";:NEXT:PRINT
530 PRINT" * [193]NSWER 'I' FOR [201]NSTRUCTIONS * [146] "
540 A$="":INPUT"[201]S THIS WHAT YOU WANT (Y, N OR I) Y[157][157][157]";A$:A$=LEFT$(A$,1)
550 IFA$="Y"THEN580
560 IFA$="I"ORA$="[201]"THENRUN1180
570 PRINT"[195]ORRECT THESE LINES, THEN [210][213][206] AGAIN:":LIST290-409:GOTO240
580 RETURN
590 :
600 REM ** ALIGN LABELS
610 PRINT"[193]LIGN LABELS, TURN PRINTER ON,"
620 PRINT"THEN PRESS <RETURN> ..."
630 GETA$:IFA$<>CHR$(13)THEN630
640 OPEN15,4,15:CLOSE15:IFSTTHENPRINT" [208][210][201][206][212][197][210] [201][211] [206][207][212] [207][206][204][201][206][197]! ":GOTO610
650 GOSUB940:REM SET UP PRINTER
660 T$="":INPUT"[208]RINT TEST PATTERN N[157][157][157]";T$:IFLEFT$(T$,1)="N"THEN720
670 GOSUB1020:REM PRINT TEST PATTERN
680 A$="":INPUT"[201]S PRINT ALIGNMENT [207][203] (Y OR N)";A$:A$=LEFT$(A$,1)
690 IFA$="Y"THEN720
700 IFA$<>"N"THEN680
710 PRINT"[210]EALIGN THE LABELS IN THE PRINTER,":CLOSE4:GOTO620
720 RETURN
730 :
740 REM ** PRINT LABELS
750 N=0:INPUT"[200]OW MANY LABELS TO PRINT";N:IFN=0THEN850
760 NR=INT((N/AX)+.999):XX=(NR*AX)-N
770 FORRP=1TONR:IFRP=NRTHENIFXXTHENFORJ=1TOPX:FORK=1TOXX:P$(J,K)="":NEXT:NEXT
780 GOSUB1070:REM PRINT A ROW OF LABELS
790 IF(RP>1)OR(N=<AX)THEN840
800 A$="":INPUT"[201]S PRINT ALIGNMENT [207][203] (Y OR N)";A$:A$=LEFT$(A$,1)
810 IFA$="Y"THEN840
820 IFA$<>"N"THEN800
830 PRINT"[210]EALIGN THE LABELS IN THE PRINTER,":CLOSE4:GOSUB620:RP=NR:GOTO750
840 NEXT
850 CLOSE4:PRINT"[164][164][164][164][164][164][164][164][164][164]":PRINT" [198][201][206][201][211][200][197][196]!"
860 RETURN
870 :
880 REM ** PRINTER CUSTOMIZATION
890 REM * SET PRINTER NAME
900 PR$="[196][208][211]-1101"
910 RETURN
920 :
930 REM * SET UP PRINTER
940 OPEN4,4,7:REM UPPER & LOWER CASE
950 PRINT#4,CHR$(27)+"2";:REM CLR TABS
960 TS$=CHR$(27)+"1":REM TS$ SETS TABS
970 FORJ=1TOAX-1:PRINT#4,SPC(CX+1);TS$;:NEXT:REM SET NEW TABS
980 PRINT#4,CHR$(141);:REM CARRIAGE RET
990 RETURN
1000 :
1010 REM * PRINT A$(X,X) AT EACH TAB
1020 FORJ=1TOPX:FORK=1TOAX:PRINT#4,A$(K,J);:IFK<AXTHENPRINT#4,CHR$(9);
1030 NEXT:PRINT#4:NEXT
1040 RETURN
1050 :
1060 REM * PRINT P$(X,X) AT EACH TAB
1070 FORK=1TOPX:FORL=1TOAX:PRINT#4,P$(K,L);:IFL<AXTHENPRINT#4,CHR$(9);
1080 NEXT:PRINT#4:NEXT
1090 RETURN
1100 REM ACCOMMODATES ANY SIZE PAPER
1110 :
1120 REM WHEN IT PRINTS < A FULL LINE, IT DOES IT ON THE RIGHTMOST LABELS, SAVING
1130 REM THE LEFTMOST ONES FOR FUTURE USE.
1140 :
1150 REM AFTER 1ST LINE IS PRINTED, IT ALWAYS GIVES A CHANCE TO REALIGN.
1160 :
1170 :
1180 T$="":PRINTCHR$(14);"[147]";
1190 PRINTT$;" [204]ABEL [205]AKER - [204]OUIS [198]. [211]ANDER [146] ":IFP$="P"THENPRINT
1200 PRINTT$;"[212]HIS IS A PROGRAM FOR PRINTING MULTIPLE"
1210 PRINTT$;"COPIES OF A SINGLE LABEL ON ANY TYPE OF"
1220 PRINTT$;"PRESSURE-SENSITIVE LABEL STOCK."
1230 PRINT:PRINTT$;"[217]OU CAN EASILY CHANGE THE WIDTH AND"
1240 PRINTT$;"NUMBER OF PRINT LINES ON EACH LABEL, OR"
1250 PRINTT$;"THE NUMBER OF LABELS ACROSS THE PAGE,"
1260 PRINTT$;"JUST BY CHANGING A FEW PROGRAM LINES."
1270 PRINT:PRINTT$;"[217]OU CHANGE THE LABEL COPY THE SAME WAY."
1280 PRINT:PRINTT$;"[212]HE PROGRAM IS SET UP FOR A [195]OMMODORE"
1290 PRINTT$;"[196][208][211]-1101 DAISY WHEEL PRINTER, BUT YOU"
1300 PRINTT$;"CAN SET IT UP FOR [193][206][217] PRINTER, [201][198] YOU"
1310 PRINTT$;"ARE A PROGRAMMER."
1320 PRINT:PRINTT$;"[215]HEN YOU [210][213][206] THE PROGRAM, YOU WILL SEE"
1330 PRINTT$;"A SAMPLE LABEL, AND YOU'LL BE ASKED IF"
1340 PRINTT$;"IT'S THE ONE YOU WANT. [201]F YOU ENTER 'N'";:IFP$="P"THENPRINT
1350 PRINTT$;"FOR 'NO', THE PROGRAM WILL [204][201][211][212] THE"
1360 PRINTT$;"LINES YOU NEED TO CHANGE."
1370 IFP$="P"THENPRINT:GOTO1410
1380 PRINT" [208]RESS ANY KEY TO CONTINUE... ";
1390 GETA$:IFA$=""THEN1390
1400 PRINTCHR$(14);"[147] [204]ABEL [205]AKER - [204]OUIS [198]. [211]ANDER [146] "
1410 PRINTT$;"[212]O CHANGE THE CONFIGURATION OF YOUR"
1420 PRINTT$;"LABEL STOCK, JUST CHANGE THE VALUES OF"
1430 PRINTT$;"VARIABLES PX, CX, AND AX IN THOSE LINES.":IFP$="P"THENPRINT
1440 PRINTT$;"[212]O CHANGE THE LABEL COPY, CHANGE THE"
1450 PRINTT$;"ELEMENTS IN THE STRING ARRAY X$()."
1460 PRINTT$;"[212]HEY CAN INCLUDE CONTROL CHARACTERS"
1470 PRINTT$;"SUCH AS [195][200][210]$(27) [[197][211][195]APE]. [212]HERE MUST"
1480 PRINTT$;"BE ONE ELEMENT IN X$() FOR EACH LINE"
1490 PRINTT$;"ON YOUR LABEL STOCK, WHETHER OR NOT"
1500 PRINTT$;"THAT LINE HAS ANY PRINTING. [212]O MAKE A"
1510 PRINTT$;"BLANK LINE, SET X$()=";CHR$(34);CHR$(34)
1520 PRINT:PRINTT$;"[212]O CONFIGURE THE PROGRAM FOR ANOTHER"
1530 PRINTT$;"PRINTER, CHANGE THE SUBROUTINES STARTING";:IFP$="P"THENPRINT
1540 PRINTT$;"AT LINE 880. [212]HE [210][197][205]S WILL TELL YOU WHAT";:IFP$="P"THENPRINT
1550 PRINTT$;"YOU NEED TO DO IN THE ROUTINES. [207]F"
1560 PRINTT$;"COURSE, [217][207][213] MUST KNOW HOW TO DO IT."
1570 PRINT:PRINTT$;"[201] HOPE YOU LIKE THE PROGRAM."
1580 IFP$="P"THENPRINT#4:CLOSE4:GOTO1630
1590 PRINT" [208]RESS 'P' TO PRINT INSTRUCTIONS ON THE"
1600 PRINT" PRINTER, OR ANOTHER KEY TO CONTINUE...";
1610 GETP$:IFP$=""THEN1610
1620 IFP$="P"THENT$=" ":OPEN4,4,7:CMD4:GOTO1190:REM T$=INDENT
1630 RUN